package cn.wolfcode.p2p.business.mapper;

import cn.wolfcode.p2p.business.domain.CreditTransfer;
import cn.wolfcode.p2p.business.query.CreditTransferQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CreditTransferMapper {

    int insert(CreditTransfer record);

    CreditTransfer selectByPrimaryKey(Long id);

    int updateByPrimaryKey(CreditTransfer record);

    List listForPage(CreditTransferQueryObject qo);

    List<CreditTransfer> listReadyCreditTransfers(@Param("bidIds") Long[] bidIds, @Param("toLoginInfoId") Long toLoginInfoId);

    List selectForInvestPage(CreditTransferQueryObject qo);

    CreditTransfer getByBidIdAndTransferFromIdAndState(@Param("bidId") Long bidId, @Param("toLoginInfoId") Long toLoginInfoId, @Param("bidRequestState") int bidRequestState);

    List ListForTransferPage(CreditTransferQueryObject qo);

    List ListForSubscribePage(CreditTransferQueryObject qo);
}